<?php
require('db.php');

$data=json_decode(file_get_contents('php://input'));
$result = mysql_query("INSERT INTO indicatoren(vakID, competentieID, zeerGoed, goed, voldoende, onvoldoende) VALUES ((SELECT id FROM vak WHERE naam='$data->vak'), '$data->competentieID', '$data->zeerGoed', '$data->goed', '$data->voldoende', '$data->onvoldoende')") or die (mysql_error());

?>